<template>
  <div>
    <h1>Sister</h1>
    {{count}}
  </div>
</template>

<script>
import PubSub from 'pubsub-js'
export default {
    name:'Sister',
    data() {
        return {
            count:0
        }
    },
    mounted() {
        // 订阅
        PubSub.subscribe('count',(_,count)=>{
            this.count = count
        })
    },
}
</script>

<style>

</style>